package model;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "warning")
public class Warning implements Serializable
{	
	private static final long serialVersionUID = -7231453733335996378L;
	
	private static int i = 0;
	
	@XmlAttribute
	private String id = "";
	
	@XmlElement
	private String info = "";
	
	public Warning() {}
	
	public Warning(String info) 
	{
		i++;
		this.id = i + "";
		this.info = info;
	}
	
	public String toString()
	{
		return "Warning: id(" + id + ") " + info;
	}

	public String getIdentification()
	{
		return id;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public String getInfo()
	{
		return info;
	}
}
